<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width">
		<title>固定表头</title>
		<style type="text/css">
			#table-container {
				border: 1px solid black;
				width: 316px;
			}

			table {
				width: 300px;
			}

			.table-header {
				padding-left: 10px;
				color: #0099FF;
				font-size: 1.3rem;
				height: 40px;
				text-align: center;
			}

			.table col {
				width: 25%;
			}

			.table-body {
				height: 200px;
				overflow-y: scroll;
				overflow-x: hidden;
			}

			.table-body td {
				padding-left: 15px;
			}
		</style>
	</head>
	<body>
		<div id="table-container">
			<div class="table-header">
				<table>
					<!-- <colgroup>
						<col />
						<col />
						<col />
						<col />
					</colgroup> -->
					<th>标题1</th>
					<th>标题2</th>
					<th>标题3</th>
					<th>标题3</th>
				</table>
			</div>
			<div class="table-body">
				<table>
					<!-- <colgroup>
						<col />
						<col />
						<col />
						<col />
					</colgroup> -->
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
					<tr>
						<td>content</td>
						<td>content</td>
						<td>content</td>
						<td>content</td>
					</tr>
				</table>
			</div>
		</div>
		<body>
</html>
